﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderList.aspx.cs" Inherits="Admin.Admin.OrderMan.OrderList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    订单状态:<asp:DropDownList runat="server" ID="OrderState" OnSelectedIndexChanged="OrderState_SelectedIndexChanged">
        <asp:ListItem Value="0">待付款</asp:ListItem>
        <asp:ListItem Value="1">待发货</asp:ListItem>
        <asp:ListItem Value="2">已发货</asp:ListItem>
        <asp:ListItem Value="3">交易完成</asp:ListItem>
        <asp:ListItem Value="-1">无效订单</asp:ListItem>
    </asp:DropDownList>
    <div style="margin-top: 8px;">
        <asp:GridView ID="Orders" runat="server" Width="100%" CellPadding="3" BorderWidth="1px"
            BorderStyle="Solid" AllowPaging="True" PageSize="15" OnPageIndexChanging="Orders_PageIndexChanging">
            AutoGenerateColumns="false" Height="100%">
            <Columns>
                <asp:BoundField DataField="OrderID" HeaderText="订单编号" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="ShopName" HeaderText="店铺名称" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="UserName" HeaderText="用户姓名" ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="Remark" HeaderText="备注" ItemStyle-HorizontalAlign="Center" />
                <asp:HyperLinkField HeaderText="查看详情" ControlStyle-Width="50" DataNavigateUrlFields="OrderID"
                    DataNavigateUrlFormatString="OrderView.aspx?OrderID={0}" Text="查看详情" ItemStyle-HorizontalAlign="Center" />
                <asp:TemplateField HeaderText="更改订单状态">
                    <ItemTemplate>
                        <asp:DropDownList ID="IsAvailable" orderid='<%#Eval("OrderID") %>' runat="server"
                            AutoPostBack="True" OnSelectedIndexChanged="UpdateOrderState_SelectedIndexChanged"
                            SelectedValue='<%# Eval("OrderState").ToString() %>'>
                            <asp:ListItem Value="0">待付款</asp:ListItem>
                            <asp:ListItem Value="1">待发货</asp:ListItem>
                            <asp:ListItem Value="2">已发货</asp:ListItem>
                            <asp:ListItem Value="3">交易完成</asp:ListItem>
                            <asp:ListItem Value="-1">无效订单</asp:ListItem>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <AlternatingRowStyle CssClass="GV_AlterRowCss" />
            <RowStyle CssClass="GV_RowCss" />
            <HeaderStyle CssClass="GV_AlterRowCss" />
            <EmptyDataTemplate>
                暂无数据</EmptyDataTemplate>
            <PagerSettings Mode="Numeric" />
        </asp:GridView>
    </div>
    </form>
</body>
</html>
